package com.opengroupe.service.common;

import java.util.List;

import com.opengroupe.entities.AccessCode;
import com.opengroupe.entities.Candidat;
import com.opengroupe.entities.Categorie;
import com.opengroupe.util.HeavyResultatQuestionnaire;

/**
 * Common services.
 * 
 * @author MMB11447
 *
 */
public interface CommonService {
	
	/**
	 * Generates and persists a new {@link AccessCode}. If a code is 
	 * already generated for the current day, the generated code is returned.
	 * 
	 * @return {@link String} a new access code.
	 */
	public AccessCode getGeneratedAccessCode();
	
	/**
	 * Common identification service.
	 * 
	 * @param codeAcces {@link String} a verifier
	 * @return <code>true</code> if the identification succeeded. <code>false</code> otherwise.
	 */
	public boolean identification(String codeAcces);

	/**
	 * Renvoie le questionnaire qui a été soumis au candidat
	 * @param candidat {@link Candidat}
	 * @return {@link HeavyResultatQuestionnaire}
	 */
	public HeavyResultatQuestionnaire consulterResultat(Candidat candidat);
	
	/**
	 * Retrieves all {@link Categorie} from database
	 * @return {@link List}
	 */
	public List<Categorie> allCategorie();
}
